home *** CD-ROM | disk | FTP | other *** search
- Path: news.acns.nwu.edu!129
- From: msypherd@merle.acns.nwu.edu (Matthew C. Sypherd)
- Newsgroups: comp.lang.c++
- Subject: Borland C++ floating point overflow - Help!
- Date: Fri, 09 Feb 96 02:29:38 GMT
- Organization: Northwestern University
- Message-ID: <4febl6$5ei@news.acns.nwu.edu>
- NNTP-Posting-Host: eme085043.res-hall.nwu.edu
- X-Newsreader: News Xpress 2.0 Beta #0
-
- Thanks for helping -
-
- I am runing Borland 4.51 / 4.52 on my P90/16MB with a Gigabyte
- motherboard and Award BIOS 4.50<something>. I am having problems simply
- entering a floating point number. Every time I do, I get "Floating Point:
- Overflow"
-
- For example,
-
- #include <iostream.h>
- main()
- {
- float x;
- cin >> x;
- cout << "It doesn't make it this far when I run it";
- reutrn 0;
- }
-
- The program compiles fine, but when I run it, I run into problems. If
- I enter a floating point number, I get the error and the program quits. If I
- enter an int into the float variable 'x', everything works fine.
-
- Also, if I put a floating point number into an int variable, instead
- of discarding the decimal part, I get a a bizzarre looping of output statments
- that lock up the program.
-
- Is this a problem with my Computer, or do I have some setting set
- incorrectly? Any help would be appreciated.
-
- I'd rather not pay the 900 number fees for Borland tech support. I
- think the should at least help me get the program running for the price I
- paid. Maybe I'm just an optimist.
-
- Thanks again,
-
- Matthew C. Sypherd
- ------------------
- msypherd@nwu.edu
-
- p.s. If you could, please post and e-mail any reply - in case I miss the
- header.
-